<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
sss
</body>
</html>
<script src='https://cdn.bootcss.com/socket.io/2.0.3/socket.io.js'></script>
<script>
// 服务端ip
var socket = io('http://127.0.0.1:80');
uid = '10000';
// socket连接后以uid登录
socket.on('connect', function(){
    socket.emit('login', '10000');
    console.log('connect success');
});
</script>